home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / AEDataModel.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  21.4 KB  |  721 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        AEDataModel.a
  3. ;
  4. ;    Contains:    AppleEvent Data Model Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  19. __AEDATAMODEL__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28. ;  Apple event descriptor types 
  29.  
  30. typeBoolean                        EQU        'bool'
  31. typeChar                        EQU        'TEXT'
  32. ;  Preferred numeric Apple event descriptor types 
  33.  
  34. typeSInt16                        EQU        'shor'
  35. typeSInt32                        EQU        'long'
  36. typeUInt32                        EQU        'magn'
  37. typeSInt64                        EQU        'comp'
  38. typeIEEE32BitFloatingPoint        EQU        'sing'
  39. typeIEEE64BitFloatingPoint        EQU        'doub'
  40. type128BitFloatingPoint            EQU        'ldbl'
  41. typeDecimalStruct                EQU        'decm'
  42. ;  Non-preferred Apple event descriptor types 
  43.  
  44. typeSMInt                        EQU        'shor'
  45. typeShortInteger                EQU        'shor'
  46. typeInteger                        EQU        'long'
  47. typeLongInteger                    EQU        'long'
  48. typeMagnitude                    EQU        'magn'
  49. typeComp                        EQU        'comp'
  50. typeSMFloat                        EQU        'sing'
  51. typeShortFloat                    EQU        'sing'
  52. typeFloat                        EQU        'doub'
  53. typeLongFloat                    EQU        'doub'
  54. typeExtended                    EQU        'exte'
  55. ;  More Apple event descriptor types 
  56.  
  57. typeAEList                        EQU        'list'
  58. typeAERecord                    EQU        'reco'
  59. typeAppleEvent                    EQU        'aevt'
  60. typeEventRecord                    EQU        'evrc'
  61. typeTrue                        EQU        'true'
  62. typeFalse                        EQU        'fals'
  63. typeAlias                        EQU        'alis'
  64. typeEnumerated                    EQU        'enum'
  65. typeType                        EQU        'type'
  66. typeAppParameters                EQU        'appa'
  67. typeProperty                    EQU        'prop'
  68. typeFSS                            EQU        'fss '
  69. typeKeyword                        EQU        'keyw'
  70. typeSectionH                    EQU        'sect'
  71. typeWildCard                    EQU        '****'
  72. typeApplSignature                EQU        'sign'
  73. typeQDRectangle                    EQU        'qdrt'
  74. typeFixed                        EQU        'fixd'
  75. typeSessionID                    EQU        'ssid'
  76. typeTargetID                    EQU        'targ'
  77. typeProcessSerialNumber            EQU        'psn '
  78. typeKernelProcessID                EQU        'kpid'
  79. typeDispatcherID                EQU        'dspt'
  80. typeNull                        EQU        'null'                ; null or nonexistent data 
  81. ;  Keywords for Apple event attributes 
  82.  
  83. keyTransactionIDAttr            EQU        'tran'
  84. keyReturnIDAttr                    EQU        'rtid'
  85. keyEventClassAttr                EQU        'evcl'
  86. keyEventIDAttr                    EQU        'evid'
  87. keyAddressAttr                    EQU        'addr'
  88. keyOptionalKeywordAttr            EQU        'optk'
  89. keyTimeoutAttr                    EQU        'timo'
  90. keyInteractLevelAttr            EQU        'inte'                ; this attribute is read only - will be set in AESend 
  91. keyEventSourceAttr                EQU        'esrc'                ; this attribute is read only 
  92. keyMissedKeywordAttr            EQU        'miss'                ; this attribute is read only 
  93. keyOriginalAddressAttr            EQU        'from'                ; new in 1.0.1 
  94.  
  95. ;     Constants used for specifying the factoring of AEDescLists. 
  96.  
  97. kAEDescListFactorNone            EQU        0
  98. kAEDescListFactorType            EQU        4
  99. kAEDescListFactorTypeAndSize    EQU        8
  100. ;  Constants used creating an AppleEvent 
  101.  
  102.                                                             ; Constant for the returnID param of AECreateAppleEvent 
  103. kAutoGenerateReturnID            EQU        -1                    ; AECreateAppleEvent will generate a session-unique ID 
  104.                                                             ; Constant for transaction ID’s 
  105. kAnyTransactionID                EQU        0                    ; no transaction is in use 
  106. ;  Apple event manager data types 
  107. ; typedef ResType                         DescType
  108.  
  109. ; typedef FourCharCode                     AEKeyword
  110.  
  111. AEDesc                    RECORD 0
  112. descriptorType             ds.l    1                ; offset: $0 (0)
  113. dataHandle                 ds.l    1                ; offset: $4 (4)
  114. sizeof                     EQU *                    ; size:   $8 (8)
  115.                         ENDR
  116. ; typedef struct AEDesc *                AEDescPtr
  117.  
  118. AEKeyDesc                RECORD 0
  119. descKey                     ds.l    1                ; offset: $0 (0)
  120. descContent                 ds        AEDesc            ; offset: $4 (4)
  121. sizeof                     EQU *                    ; size:   $C (12)
  122.                         ENDR
  123. ;  a list of AEDesc's is a special kind of AEDesc 
  124. AEDescList                RECORD 0
  125. f                         ds        AEDesc
  126. sizeof                     EQU *                    ; size:   $8 (8)
  127.                         ENDR
  128.  
  129.  
  130. ;  AERecord is a list of keyworded AEDesc's 
  131. AERecord                RECORD 0
  132. f                         ds        AEDescList
  133. sizeof                     EQU *                    ; size:   $8 (8)
  134.                         ENDR
  135.  
  136.  
  137. ;  an AEDesc which contains address data 
  138. AEAddressDesc            RECORD 0
  139. f                         ds        AEDesc
  140. sizeof                     EQU *                    ; size:   $8 (8)
  141.                         ENDR
  142.  
  143.  
  144. ;  an AERecord that contains an AppleEvent, and related data types 
  145. AppleEvent                RECORD 0
  146. f                         ds        AERecord
  147. sizeof                     EQU *                    ; size:   $8 (8)
  148.                         ENDR
  149.  
  150.  
  151. ; typedef struct AppleEvent *            AppleEventPtr
  152.  
  153. ; typedef SInt16                         AEReturnID
  154.  
  155. ; typedef SInt32                         AETransactionID
  156.  
  157. ; typedef FourCharCode                     AEEventClass
  158.  
  159. ; typedef FourCharCode                     AEEventID
  160.  
  161. ; typedef SInt8                         AEArrayType
  162.  
  163.  
  164. kAEDataArray                    EQU        0
  165. kAEPackedArray                    EQU        1
  166. kAEDescArray                    EQU        3
  167. kAEKeyDescArray                    EQU        4
  168.  
  169.  
  170. kAEHandleArray                    EQU        2
  171. AEArrayData                RECORD 0
  172. kAEDataArray             ds.w    1                ; offset: $0 (0) <-- really an array of length one
  173.                          ORG 0
  174. kAEPackedArray             ds.b    1                ; offset: $0 (0) <-- really an array of length one
  175.                          ORG 0
  176. kAEHandleArray             ds.l    1                ; offset: $0 (0) <-- really an array of length one
  177.                          ORG 0
  178. kAEDescArray             ds        AEDesc            ; offset: $0 (0) <-- really an array of length one
  179.                          ORG 0
  180. kAEKeyDescArray             ds        AEKeyDesc        ; offset: $0 (0) <-- really an array of length one
  181. sizeof                     EQU *                    ; size:   $C (12)
  182.                         ENDR
  183. ; typedef union AEArrayData *            AEArrayDataPointer
  184.  
  185.  
  186. ; **************************************************************************
  187. ;  These calls are used to set up and modify the coercion dispatch table.
  188. ;*************************************************************************
  189.  
  190. ; typedef UniversalProcPtr                 AECoercionHandlerUPP
  191.  
  192. ;
  193. ; pascal OSErr AEInstallCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, long handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler)
  194. ;
  195.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  196.         Macro
  197.         _AEInstallCoercionHandler
  198.             move.w              #$0A22,D0
  199.             dc.w                $A816
  200.         EndM
  201.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  202.         IMPORT_CFM_FUNCTION AEInstallCoercionHandler
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal OSErr AERemoveCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler)
  207. ;
  208.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  209.         Macro
  210.         _AERemoveCoercionHandler
  211.             move.w              #$0723,D0
  212.             dc.w                $A816
  213.         EndM
  214.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION AERemoveCoercionHandler
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal OSErr AEGetCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP *handler, long *handlerRefcon, Boolean *fromTypeIsDesc, Boolean isSysHandler)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  222.         Macro
  223.         _AEGetCoercionHandler
  224.             move.w              #$0B24,D0
  225.             dc.w                $A816
  226.         EndM
  227.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  228.         IMPORT_CFM_FUNCTION AEGetCoercionHandler
  229.     ENDIF
  230.  
  231. ; **************************************************************************
  232. ;  The following calls provide for a coercion interface.
  233. ;*************************************************************************
  234.  
  235. ;
  236. ; pascal OSErr AECoercePtr(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, AEDesc *result)
  237. ;
  238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  239.         Macro
  240.         _AECoercePtr
  241.             move.w              #$0A02,D0
  242.             dc.w                $A816
  243.         EndM
  244.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  245.         IMPORT_CFM_FUNCTION AECoercePtr
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal OSErr AECoerceDesc(const AEDesc *theAEDesc, DescType toType, AEDesc *result)
  250. ;
  251.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  252.         Macro
  253.         _AECoerceDesc
  254.             move.w              #$0603,D0
  255.             dc.w                $A816
  256.         EndM
  257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  258.         IMPORT_CFM_FUNCTION AECoerceDesc
  259.     ENDIF
  260.  
  261.  
  262. ; **************************************************************************
  263. ; The following calls apply to any AEDesc. Every 'result' descriptor is
  264. ; created for you, so you will be responsible for memory management
  265. ; (including disposing) of the descriptors so created.  
  266. ;*************************************************************************
  267.  
  268. ;
  269. ; pascal OSErr AECreateDesc(DescType typeCode, const void *dataPtr, Size dataSize, AEDesc *result)
  270. ;
  271.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  272.         Macro
  273.         _AECreateDesc
  274.             move.w              #$0825,D0
  275.             dc.w                $A816
  276.         EndM
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION AECreateDesc
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal OSErr AEDisposeDesc(AEDesc *theAEDesc)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         Macro
  286.         _AEDisposeDesc
  287.             move.w              #$0204,D0
  288.             dc.w                $A816
  289.         EndM
  290.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  291.         IMPORT_CFM_FUNCTION AEDisposeDesc
  292.     ENDIF
  293.  
  294. ;
  295. ; pascal OSErr AEDuplicateDesc(const AEDesc *theAEDesc, AEDesc *result)
  296. ;
  297.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  298.         Macro
  299.         _AEDuplicateDesc
  300.             move.w              #$0405,D0
  301.             dc.w                $A816
  302.         EndM
  303.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  304.         IMPORT_CFM_FUNCTION AEDuplicateDesc
  305.     ENDIF
  306.  
  307.  
  308. ; **************************************************************************
  309. ;  The following calls apply to AEDescList. Since AEDescList is a subtype of
  310. ;  AEDesc, the calls in the previous section can also be used for AEDescList.
  311. ;  All list and array indices are 1-based. If the data was greater than
  312. ;  maximumSize in the routines below, then actualSize will be greater than
  313. ;  maximumSize, but only maximumSize bytes will actually be retrieved.
  314. ;*************************************************************************
  315.  
  316. ;
  317. ; pascal OSErr AECreateList(const void *factoringPtr, Size factoredSize, Boolean isRecord, AEDescList *resultList)
  318. ;
  319.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  320.         Macro
  321.         _AECreateList
  322.             move.w              #$0706,D0
  323.             dc.w                $A816
  324.         EndM
  325.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  326.         IMPORT_CFM_FUNCTION AECreateList
  327.     ENDIF
  328.  
  329. ;
  330. ; pascal OSErr AECountItems(const AEDescList *theAEDescList, long *theCount)
  331. ;
  332.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  333.         Macro
  334.         _AECountItems
  335.             move.w              #$0407,D0
  336.             dc.w                $A816
  337.         EndM
  338.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  339.         IMPORT_CFM_FUNCTION AECountItems
  340.     ENDIF
  341.  
  342. ;
  343. ; pascal OSErr AEPutPtr(AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
  344. ;
  345.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  346.         Macro
  347.         _AEPutPtr
  348.             move.w              #$0A08,D0
  349.             dc.w                $A816
  350.         EndM
  351.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  352.         IMPORT_CFM_FUNCTION AEPutPtr
  353.     ENDIF
  354.  
  355. ;
  356. ; pascal OSErr AEPutDesc(AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
  357. ;
  358.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  359.         Macro
  360.         _AEPutDesc
  361.             move.w              #$0609,D0
  362.             dc.w                $A816
  363.         EndM
  364.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  365.         IMPORT_CFM_FUNCTION AEPutDesc
  366.     ENDIF
  367.  
  368. ;
  369. ; pascal OSErr AEGetNthPtr(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  370. ;
  371.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  372.         Macro
  373.         _AEGetNthPtr
  374.             move.w              #$100A,D0
  375.             dc.w                $A816
  376.         EndM
  377.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  378.         IMPORT_CFM_FUNCTION AEGetNthPtr
  379.     ENDIF
  380.  
  381. ;
  382. ; pascal OSErr AEGetNthDesc(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
  383. ;
  384.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  385.         Macro
  386.         _AEGetNthDesc
  387.             move.w              #$0A0B,D0
  388.             dc.w                $A816
  389.         EndM
  390.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  391.         IMPORT_CFM_FUNCTION AEGetNthDesc
  392.     ENDIF
  393.  
  394. ;
  395. ; pascal OSErr AESizeOfNthItem(const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
  396. ;
  397.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  398.         Macro
  399.         _AESizeOfNthItem
  400.             move.w              #$082A,D0
  401.             dc.w                $A816
  402.         EndM
  403.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  404.         IMPORT_CFM_FUNCTION AESizeOfNthItem
  405.     ENDIF
  406.  
  407. ;
  408. ; pascal OSErr AEGetArray(const AEDescList *theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType *itemType, Size *itemSize, long *itemCount)
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  411.         Macro
  412.         _AEGetArray
  413.             move.w              #$0D0C,D0
  414.             dc.w                $A816
  415.         EndM
  416.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  417.         IMPORT_CFM_FUNCTION AEGetArray
  418.     ENDIF
  419.  
  420. ;
  421. ; pascal OSErr AEPutArray(AEDescList *theAEDescList, AEArrayType arrayType, const AEArrayData *arrayPtr, DescType itemType, Size itemSize, long itemCount)
  422. ;
  423.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  424.         Macro
  425.         _AEPutArray
  426.             move.w              #$0B0D,D0
  427.             dc.w                $A816
  428.         EndM
  429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  430.         IMPORT_CFM_FUNCTION AEPutArray
  431.     ENDIF
  432.  
  433. ;
  434. ; pascal OSErr AEDeleteItem(AEDescList *theAEDescList, long index)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  437.         Macro
  438.         _AEDeleteItem
  439.             move.w              #$040E,D0
  440.             dc.w                $A816
  441.         EndM
  442.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  443.         IMPORT_CFM_FUNCTION AEDeleteItem
  444.     ENDIF
  445.  
  446.  
  447. ; **************************************************************************
  448. ; The following calls apply to AERecord. Since AERecord is a subtype of
  449. ; AEDescList, the calls in the previous sections can also be used for
  450. ; AERecord an AERecord can be created by using AECreateList with isRecord
  451. ; set to true. 
  452. ;*************************************************************************
  453.  
  454. ;  Note: none of the “key” calls were available in the PowerPC 7.x IntefaceLib.
  455. ;  In C, a #define is used to map “key” calls to “param” calls.  In pascal
  456. ;  this mapping is done in externally linked glue code.
  457. ;
  458.  
  459.  
  460. ;
  461. ; pascal OSErr AEPutKeyPtr(AERecord *theAERecord, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  462. ;
  463.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  464.         Macro
  465.         _AEPutKeyPtr
  466.             move.w              #$0A0F,D0
  467.             dc.w                $A816
  468.         EndM
  469.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  470.         IMPORT_CFM_FUNCTION AEPutKeyPtr
  471.     ENDIF
  472.  
  473. ;
  474. ; pascal OSErr AEPutKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  475. ;
  476.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  477.         Macro
  478.         _AEPutKeyDesc
  479.             move.w              #$0610,D0
  480.             dc.w                $A816
  481.         EndM
  482.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION AEPutKeyDesc
  484.     ENDIF
  485.  
  486. ;
  487. ; pascal OSErr AEGetKeyPtr(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  488. ;
  489.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  490.         Macro
  491.         _AEGetKeyPtr
  492.             move.w              #$0E11,D0
  493.             dc.w                $A816
  494.         EndM
  495.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  496.         IMPORT_CFM_FUNCTION AEGetKeyPtr
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal OSErr AEGetKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  501. ;
  502.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  503.         Macro
  504.         _AEGetKeyDesc
  505.             move.w              #$0812,D0
  506.             dc.w                $A816
  507.         EndM
  508.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  509.         IMPORT_CFM_FUNCTION AEGetKeyDesc
  510.     ENDIF
  511.  
  512. ;
  513. ; pascal OSErr AESizeOfKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  514. ;
  515.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  516.         Macro
  517.         _AESizeOfKeyDesc
  518.             move.w              #$0829,D0
  519.             dc.w                $A816
  520.         EndM
  521.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  522.         IMPORT_CFM_FUNCTION AESizeOfKeyDesc
  523.     ENDIF
  524.  
  525. ;
  526. ; pascal OSErr AEDeleteKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword)
  527. ;
  528.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  529.         Macro
  530.         _AEDeleteKeyDesc
  531.             move.w              #$0413,D0
  532.             dc.w                $A816
  533.         EndM
  534.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  535.         IMPORT_CFM_FUNCTION AEDeleteKeyDesc
  536.     ENDIF
  537.  
  538. ; **************************************************************************
  539. ;  The following calls create and manipulate the AppleEvent data type.
  540. ;*************************************************************************
  541.  
  542. ;
  543. ; pascal OSErr AECreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
  544. ;
  545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  546.         Macro
  547.         _AECreateAppleEvent
  548.             move.w              #$0B14,D0
  549.             dc.w                $A816
  550.         EndM
  551.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  552.         IMPORT_CFM_FUNCTION AECreateAppleEvent
  553.     ENDIF
  554.  
  555.  
  556. ; **************************************************************************
  557. ;  The following calls are used to pack and unpack parameters from records
  558. ;  of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  559. ;  in the previous sections can also be used for variables of type
  560. ;  AppleEvent. The next six calls are in fact identical to the six calls
  561. ;  for AERecord.
  562. ;*************************************************************************
  563.  
  564. ;
  565. ; pascal OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  566. ;
  567.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  568.         Macro
  569.         _AEPutParamPtr
  570.             move.w              #$0A0F,D0
  571.             dc.w                $A816
  572.         EndM
  573.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  574.         IMPORT_CFM_FUNCTION AEPutParamPtr
  575.     ENDIF
  576.  
  577. ;
  578. ; pascal OSErr AEPutParamDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  579. ;
  580.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  581.         Macro
  582.         _AEPutParamDesc
  583.             move.w              #$0610,D0
  584.             dc.w                $A816
  585.         EndM
  586.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  587.         IMPORT_CFM_FUNCTION AEPutParamDesc
  588.     ENDIF
  589.  
  590. ;
  591. ; pascal OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  592. ;
  593.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  594.         Macro
  595.         _AEGetParamPtr
  596.             move.w              #$0E11,D0
  597.             dc.w                $A816
  598.         EndM
  599.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  600.         IMPORT_CFM_FUNCTION AEGetParamPtr
  601.     ENDIF
  602.  
  603. ;
  604. ; pascal OSErr AEGetParamDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  605. ;
  606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  607.         Macro
  608.         _AEGetParamDesc
  609.             move.w              #$0812,D0
  610.             dc.w                $A816
  611.         EndM
  612.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  613.         IMPORT_CFM_FUNCTION AEGetParamDesc
  614.     ENDIF
  615.  
  616. ;
  617. ; pascal OSErr AESizeOfParam(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  618. ;
  619.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  620.         Macro
  621.         _AESizeOfParam
  622.             move.w              #$0829,D0
  623.             dc.w                $A816
  624.         EndM
  625.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  626.         IMPORT_CFM_FUNCTION AESizeOfParam
  627.     ENDIF
  628.  
  629. ;
  630. ; pascal OSErr AEDeleteParam(AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
  631. ;
  632.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  633.         Macro
  634.         _AEDeleteParam
  635.             move.w              #$0413,D0
  636.             dc.w                $A816
  637.         EndM
  638.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  639.         IMPORT_CFM_FUNCTION AEDeleteParam
  640.     ENDIF
  641.  
  642.  
  643.  
  644. ; **************************************************************************
  645. ; The following calls also apply to type AppleEvent. Message attributes are
  646. ; far more restricted, and can only be accessed through the following 5
  647. ; calls. The various list and record routines cannot be used to access the
  648. ; attributes of an event. 
  649. ;*************************************************************************
  650.  
  651. ;
  652. ; pascal OSErr AEGetAttributePtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  653. ;
  654.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  655.         Macro
  656.         _AEGetAttributePtr
  657.             move.w              #$0E15,D0
  658.             dc.w                $A816
  659.         EndM
  660.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  661.         IMPORT_CFM_FUNCTION AEGetAttributePtr
  662.     ENDIF
  663.  
  664. ;
  665. ; pascal OSErr AEGetAttributeDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  666. ;
  667.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  668.         Macro
  669.         _AEGetAttributeDesc
  670.             move.w              #$0826,D0
  671.             dc.w                $A816
  672.         EndM
  673.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  674.         IMPORT_CFM_FUNCTION AEGetAttributeDesc
  675.     ENDIF
  676.  
  677. ;
  678. ; pascal OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  679. ;
  680.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  681.         Macro
  682.         _AESizeOfAttribute
  683.             move.w              #$0828,D0
  684.             dc.w                $A816
  685.         EndM
  686.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  687.         IMPORT_CFM_FUNCTION AESizeOfAttribute
  688.     ENDIF
  689.  
  690. ;
  691. ; pascal OSErr AEPutAttributePtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  692. ;
  693.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  694.         Macro
  695.         _AEPutAttributePtr
  696.             move.w              #$0A16,D0
  697.             dc.w                $A816
  698.         EndM
  699.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION AEPutAttributePtr
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal OSErr AEPutAttributeDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  707.         Macro
  708.         _AEPutAttributeDesc
  709.             move.w              #$0627,D0
  710.             dc.w                $A816
  711.         EndM
  712.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  713.         IMPORT_CFM_FUNCTION AEPutAttributeDesc
  714.     ENDIF
  715.  
  716.  
  717.  
  718.     ENDIF ; __AEDATAMODEL__ 
  719.  
  720.